<?php
include('config.php');
$id = addslashes($_GET['id']);
$photo = mysql_query("SELECT demo_picture FROM demo Where demo_ID='$id'");
$photo = mysql_fetch_assoc($photo);
$photo = $photo['demo_picture'];
header("Content-type: image/jpeg");
echo $photo;
?>